package com.editoken.mp.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.editoken.mp.enums.UserStatus;
import lombok.Data;
import org.apache.ibatis.type.TypeHandler;

import java.time.LocalDateTime;

@Data
@TableName(value = "tb_user",autoResultMap = true)
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
//    @TableField("username")
    private String username;
    private String password;
    private String phone;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private UserInfo info;
    private UserStatus status;
    private Integer balance;
    @TableField("is_married")
    private Boolean isMarried;

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
